package cn.kgc.springbootdemo.job;

import cn.kgc.springbootdemo.exception.HandleException;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * <h3>springbootdemo</h3>
 * <p>job配置类</p>
 *
 * @author : DongZeJian
 * @date : 2020-12-23 16:53
 **/
@Slf4j
@Component
public class DomeJob {

    @XxlJob("demoJobHandler")
    public ReturnT<String> demoJobHandler(String src) {
        log.info("定时任务开始执行");
        throw new HandleException(500,"我就是我报错的我");
    }
}
